import http from '@/utils/request'

//调用axios实例的方法创建promise对象，之后对promise对象.then的方式获取require参数
export const getdata = () => {
    return http.get()
}

export function checkuser(data){
    return http.get('/user',{params:data})
}

export function getmenu(user){
    return http.get('/menu',{params:user})
}

export function getgoods(config){
    return http.get('/goods',{params:config})
}

export function searchgood(search){
    return http.get('/searchgood',{params:search})
}

export function setnewgood(gooddata){
    return http.get('/setnewgood',{params:gooddata})
}

export function updategood(gooddata){
    return http.get('/updategood',{params:gooddata})
}

export function getcategory(){
    return http.get('/getcategory')
}

export function getparnode(config){
    return http.get('/getpardata',{params:config})
}

export function getlastnode(config){
    return http.get('/getlastdata',{params:config})
}

export function userdata(config){
    return http.get('/userdata',{params:config})
}

export function searchuser(userdata){
    return http.get('/searchuser',{params:userdata})
}

export function setnewuser(userdata){
    return http.get('/setnewuser',{params:userdata})
}

export function updateuser(userdata){
    return http.get('/updateuser',{params:userdata})
}

export function getorders(config){
    return http.get('/orderlist',{params:config})
}

export function searchorder(search){
    return http.get('/searchorder',{params:search})
}

export function setnewgroup(data){
    return http.get('/setlistgroup',{params:data})
}

export function getgrouplist(config){
    return http.get('/getgrouplist',{params:config})
}

export function searchgrouplist(config){
    return http.get('/searchgroup',{params:config})
}